/* recognize tokens for the calculator */
%option noyywrap nodefault yylineno
%{
#include "parser.h"
#include <stdio.h>
%}

%%

"+" |
"-" |
"*" |
"/" |
"(" |
")" {
			return yytext[0];
		}
[0-9]+"."[0-9]* |
"."?[0-9]+ {
							return NUMBER;
					 }
\n {
	 		return EOL;
	 }
"//".* /* ignore the comment */
[ \t] /* ignore whitespace */
. {
		yyerror(yytext);
	}

%%

